1. Field of the Invention
The present invention relates to an image processing apparatus, a processing method therefor, and a non-transitory computer-readable storage medium.
2. Description of the Related Art
Various technology for searching for a similar image has been proposed. For example, a method for searching for a similar image using an overall feature (global feature amount) of an image is known. In relation to such technology, a method has been proposed in which, for example, an image is divided into a plurality of blocks, pattern matching is performed using respective representative colors of the blocks, and a similar image is searched for utilizing color position information (Japanese Patent Laid-Open No. 8-249349).
Further, a method is also known in which an image is divided into a plurality of blocks, a feature amount of each block is calculated, a label matrix is generated by giving labels to the blocks according to the feature amounts, which is used as a global feature amount, and searching is performed using that global feature amount (Japanese Patent Laid-Open No. 10-260983).
A method has also been proposed in which a similar image is searched for using a local feature amount of an image, rather than a feature amount of the entire image. In this method, first, a feature point (local feature point) is detected from an image, and a feature amount (local feature amount) for that feature point is calculated based on the feature point and image information in the vicinity thereof. Image searching is performed by matching local feature amounts of images.
With regard to a technique utilizing the above local feature amounts, a method has been proposed in which a local feature amount is defined as the amount constituted by a plurality of elements that are rotation invariant and enlargement/reduction invariant, and searching is possible even if an image is rotated or enlarged/reduced (C. Schmid and R. Mohr, “Local grayvalue invariants for image retrieval,” IEEE Trans. PAMI., Vol. 19, No. 5, pp. 530-534, 1997.). Other than this, as technology for calculating a local feature amount, technology described in “David G. Lowe, ‘Distinctive Image Features from Scale-Invariant Keypoints,’ International Journal of Computer Vision, 60, 2 (2004), pp. 91-110” (hereinafter, referred to as Document 1) and “Y. Ke and R. Sukthankar, ‘PCA-SIFT: A More Distinctive Representation for Local Image Descriptors,’ Proc. CVPR, pp. 506-513, 2004” (hereinafter, referred to as Document 2) has also been proposed.
In many systems using a local feature amount, filter processing such as blur processing is performed on an input image in order to give noise resistance. Generally, filter processing is convolution processing with a filter window and an image. At this time, the filter window protrudes from the image at an edge portion of the image, and thus accurate filter processing cannot be performed.
In order to also perform processing on such an edge portion of the image similarly to a region other than the edge portion, Japanese Patent Laid-Open No. 2008-93172 describes technology for detecting a lesion candidate region based on the amount of change in a pixel value between a pixel of interest and peripheral pixels thereof with respect to an image of a body cavity, and with this technology, if the pixel of interest is at the edge of the image, the image of that edge portion is simply replicated, thereby securing the peripheral pixels of the region of interest.
When a local feature amount is calculated, first, a region (local feature amount calculation region) of a small size having a feature point in the center is set, and a local feature amount is calculated based on a pixel pattern in that region. Accordingly, at the edge portion of the image, a local feature amount calculation region may protrude from the image.
Thus, in searching using a local feature amount, fundamentally, there is often a region in which a local feature amount cannot be detected (local feature amount calculation impossible region) from the periphery of the edge of the image. This local feature amount calculation impossible region occurs due to protrusion of a filter window or a local feature amount calculation region.
Accordingly, for example, if searching utilizing a local feature amount is applied to an information leak security system, an object in the local feature amount calculation impossible region cannot be searched for, which may create a security hole. Thus, it is necessary to reduce the local feature amount calculation impossible region as much as possible.